<template>
  <div class="reset-step-view">
    <div class="box">
      <div class="icon-wrap">
        <svg-icon class="icon" name="progress-success"></svg-icon>
      </div>
      <div class="info">
        <div class="label">重置成功</div>
        <div class="tip">已为您的账户重置密码，请重新登录</div>
      </div>
    </div>

    <div class="btn-wrap">
      <t-button class="login-btn" theme="primary" @click="goToLogin">前往登录</t-button>
    </div>
  </div>
</template>

<script setup lang="ts">
const emits = defineEmits(['event']);

const goToLogin = () => {
  emits('event', { type: 'login' });
};
</script>

<style lang="less" scoped>
.reset-step-view {
  width: 374px;
  height: 121px;
  display: flex;
  margin-top: 46px;
  flex-direction: column;

  .box {
    display: flex;
    gap: 24px;
    align-items: center;
    justify-content: center;
  }

  .icon-wrap {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: rgb(104 211 145 / 10%);

    .icon {
      width: 21px;
      height: 21px;
    }
  }

  .info {
    line-height: 18px;
    color: #fff;

    .label {
      font-size: 16px;
    }

    .tip {
      font-size: 12px;
      margin-top: 8px;
    }
  }

  .btn-wrap {
    margin-top: 40px;
  }
}
</style>
